package cn.ustb.dao;

import cn.ustb.entity.PostponeExamApply;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PostponeExamApplyDao {
    @Select("SELECT * FROM postponeexamapply")
    List<PostponeExamApply> getAll();

    @Select("select * from postponeexamapply where studentId = #{studentId}")
    PostponeExamApply get(String studentId);

    @Insert("insert into postponeexamapply values(#{yearTerm},#{studentId},#{courseName},#{applyReason})")
    void insert(PostponeExamApply postponeExamApply);

    @Delete("delete from postponeexamapply where studentId = #{studentId}")
    void delete(String studentId);
}
